/*
 Navicat Premium Data Transfer

 Source Server         : MySql
 Source Server Type    : MySQL
 Source Server Version : 50723
 Source Host           : 127.0.0.1:3306
 Source Schema         : public_prevention

 Target Server Type    : MySQL
 Target Server Version : 50723
 File Encoding         : 65001

 Date: 30/10/2020 08:55:22
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for record
-- ----------------------------
DROP TABLE IF EXISTS `record`;
CREATE TABLE `record` (
  `id` int(10) NOT NULL,
  `upload_user_id` int(10) DEFAULT NULL,
  `address_name` varchar(200) DEFAULT NULL,
  `type` int(4) DEFAULT NULL,
  `status` int(4) DEFAULT '0',
  `location_json` varchar(2500) DEFAULT NULL,
  `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `modify_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `remark` varchar(2500) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for test_0
-- ----------------------------
DROP TABLE IF EXISTS `test_0`;
CREATE TABLE `test_0` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `key` varchar(255) DEFAULT NULL,
  `value` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=807 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of test_0
-- ----------------------------
BEGIN;
INSERT INTO `test_0` VALUES (799, 'sdfgbnghfdsadf', '123dsfs');
COMMIT;

-- ----------------------------
-- Table structure for upload_file
-- ----------------------------
DROP TABLE IF EXISTS `upload_file`;
CREATE TABLE `upload_file` (
  `id` int(10) NOT NULL,
  `record_id` int(10) DEFAULT NULL,
  `file_type` varchar(100) DEFAULT NULL,
  `file_name` varchar(1000) DEFAULT NULL,
  `file_path` varchar(1000) DEFAULT NULL,
  `upload_user` varchar(100) DEFAULT NULL,
  `upload_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(10) NOT NULL,
  `status` int(3) NOT NULL DEFAULT '0' COMMENT '0=群众，1=巡查人员，2=被拉黑',
  `open_id` varchar(100) DEFAULT NULL COMMENT '微信open id',
  `wx_name` varchar(100) DEFAULT NULL COMMENT '微信名',
  `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
  `modify_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  `remarks` varchar(4000) DEFAULT NULL COMMENT '拉黑原因等备注',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

SET FOREIGN_KEY_CHECKS = 1;
